home *** CD-ROM | disk | FTP | other *** search
/ ETO Development Tools 4 / ETO Development Tools 4.iso / Essentials / MacApp Documentation / MacApp.TECH$ Archives / 1987 / Jul 87 / Response to… < prev    next >
Encoding:
Text File  |  1991-03-06  |  1.5 KB  |  38 lines  |  [TEXT/GEOL]

  1. Item    2397643                         14-July-87        13:36
  2.  
  3. From:   ROSENSTEIN1                     Rosenstein, Larry
  4.  
  5. To:     U0239                           Louisiana State U Bookstore
  6.  
  7. cc:     MACAPP$                         MacApp Interest List
  8.  
  9. Sub:    Response to Patching TESelect…
  10.  
  11. To elaborate on what David said about this:
  12.  
  13. TApplication.SetupTheMenus is responsible for setting up the menus.  It uses a
  14. global flag (gMenusAreSetup) to determine if it has to do anything.
  15.  
  16. MacApp always calls SetupTheMenus when the user clicks in the menu bar or types
  17. a command-key.  MacApp also calls this once in TApplication.Idle if there are
  18. no other events pending.  MacApp always sets gMenusAreSetup to FALSE each time
  19. through the event loop.  (See TApplication.DispatchEvent, which contains the
  20. local proc FinishDisEvt.)
  21.  
  22. This should be sufficient for changing the text of a menu item, so you can do
  23. this in your DoSetupMenus.  Be sure to call the MacApp global procedure
  24. SetCmdName.
  25.  
  26. In addition, there is another global flag called gRedrawMenuBar.  If you set
  27. this to TRUE, then MacApp will call SetupTheMenus immediately after the current
  28. event is processed, without waiting until the Idle method.  (This is also done
  29. in FinishDispEvt.)  You can also set it to TRUE within a DoSetupMenus method to
  30. force MacApp to redraw the menu bar; normally them menu bar is not redrawn
  31. unless MacApp determines that something has changed.  gRedrawMenuBar is
  32. normally usd only if you add/remove menus from the menu bar.
  33.  
  34. Larry Rosenstein
  35.  
  36.  
  37.  
  38.